Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add solana checks to make file #407

Merged
merged 9 commits into from
Jan 6, 2025
Merged

Add solana checks to make file #407

merged 9 commits into from
Jan 6, 2025

Conversation

agusaldasoro
Copy link
Contributor

@agusaldasoro agusaldasoro commented Dec 26, 2024

The Solana Contracts have many validations regarding format and autogenerated code, this new make command needs to be run only when a file under chains/solana was modified and auto fix style issues, and auto generates all needed files.

@winder
Copy link
Contributor

winder commented Dec 26, 2024

Could you put this in a make target? Something like "make solana_checks". The pre commit config would call the target (and maybe do the yubi key thing).

We could also call that target as part of CI to ensure these files are always consistent. Add a call to the new target here:

- name: ensure no changes

@agusaldasoro agusaldasoro requested a review from a team as a code owner December 30, 2024 20:04
@agusaldasoro
Copy link
Contributor Author

Could you put this in a make target? Something like "make solana_checks". The pre commit config would call the target (and maybe do the yubi key thing).

We could also call that target as part of CI to ensure these files are always consistent. Add a call to the new target here:

- name: ensure no changes

All Solana Validations are run in https://github.com/smartcontractkit/chainlink-ccip/blob/feat/add-docs/.github/workflows/solana.yml

The pre-commit hook is just for local dev

@agusaldasoro agusaldasoro requested a review from toblich January 2, 2025 18:55
@agusaldasoro agusaldasoro changed the title Add pre commit hook Add solana checks to make file Jan 2, 2025
cd ./contracts && anchor build

.PHONY: solana-checks
solana-checks: clippy anchor-go-gen format gomodtidy lint-go rust-tests go-tests build-contracts
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The anchor-go-gen is already building the contracts, could you please remove that redundancy to bring down the time it takes to run this command?

Suggested change
solana-checks: clippy anchor-go-gen format gomodtidy lint-go rust-tests go-tests build-contracts
solana-checks: clippy anchor-go-gen format gomodtidy lint-go rust-tests go-tests

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I needed it to recreate the IDL, as the tests modify them adding the program_ids

@agusaldasoro agusaldasoro requested a review from toblich January 6, 2025 14:35
Copy link

github-actions bot commented Jan 6, 2025

Metric feat/add-docs main
Coverage 76.5% 76.4%

@agusaldasoro agusaldasoro merged commit a5e767b into main Jan 6, 2025
17 checks passed
@agusaldasoro agusaldasoro deleted the feat/add-docs branch January 6, 2025 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants